/**************************************************************
 *@ProjectName: blweibo
 *@FileName: WeiboReceiver.java
 *@Date: 2011-5-31
 *@Copyright: 2011 www.hrbanlv.com Inc. All rights reserved.
 **************************************************************/
package com.zhiweibo;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

import com.zhiweibo.util.HttpUtil;

/**
 * The Class WeiboReceiver.
 * 
 * @author SunHaibin
 * @since Android 1.6
 * @history 2011-5-31
 */
public class WeiboReceiver extends BroadcastReceiver {

    /*
     * (non-Javadoc)
     * 
     * @see android.content.BroadcastReceiver#onReceive(android.content.Context,
     * android.content.Intent)
     */
    @Override
    public void onReceive(final Context context, Intent intent) {
        String strAct = intent.getAction();
        if (strAct.equals(HttpUtil.NO_NET)) {
            Toast.makeText(context, R.string.communicating_failed, Toast.LENGTH_SHORT).show();
        } else if (strAct.equals("com.hbr.weibo.noimage")) {
            Toast.makeText(context, R.string.downloadpic_failed, Toast.LENGTH_SHORT).show();
        }

    }

}
